/* 全局基础样式定义 */
:root {
  --el-color-primary: #1890ff;
  --el-color-success: #52c41a;
  --el-color-warning: #faad14;
  --el-color-danger: #f5222d;
  --el-color-info: #909399;
  
  --page-bg-color: #f0f2f5;
  --card-bg-color: #ffffff;
  --header-height: 60px;
  --sidebar-width-expanded: 220px;
  --sidebar-width-collapsed: 64px;
  --footer-height: 50px;
}

/* 清除默认样式 */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-size: 14px;
}

/* 布局容器样式 */
.layout-container {
  min-height: 100vh;
  background-color: var(--page-bg-color);
}

/* 页面标题样式 */
.page-title {
  margin-bottom: 20px;
  line-height: 1.5;
  font-size: 20px;
  font-weight: 500;
  color: #333;
}

/* 卡片容器样式 */
.app-container {
  padding: 20px;
}

/* 表格样式重写 */
.el-table {
  .el-table__header-wrapper {
    th {
      background-color: #fafafa;
      color: #333;
      font-weight: 500;
      padding: 12px 0;
    }
  }
  
  .el-table__row {
    td {
      padding: 12px 0;
    }
  }
}

/* 表单样式重写 */
.el-form {
  .el-form-item__label {
    font-weight: 500;
  }
  
  .el-input {
    width: 100%;
  }
  
  &.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f7f7f7;
    border-radius: 4px;
    
    .el-form-item {
      margin-bottom: 10px;
      margin-right: 10px;
    }
    
    .form-btns {
      margin-left: auto;
      align-self: flex-end;
    }
  }
}

/* 分页样式 */
.pagination-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 按钮样式 */
.btn-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-end;
  
  .el-button {
    margin-left: 10px;
  }
}

/* 对话框样式 */
.el-dialog {
  .el-dialog__header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .el-dialog__footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
  }
}

/* 表单项提示信息 */
.form-tip {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
  line-height: 1.5;
}

/* 状态类标记样式 */
.status-tag {
  font-size: 12px;
  padding: 2px 8px;
  margin-right: 5px;
  border-radius: 10px;
  display: inline-block;
  
  &.active {
    background-color: rgba(82, 196, 26, 0.1);
    color: var(--el-color-success);
  }
  
  &.inactive {
    background-color: rgba(245, 34, 45, 0.1);
    color: var(--el-color-danger);
  }
  
  &.pending {
    background-color: rgba(250, 173, 20, 0.1);
    color: var(--el-color-warning);
  }
}

/* 适应不同屏幕尺寸的响应式布局 */
@media screen and (max-width: 1200px) {
  .el-dialog {
    width: 90% !important;
  }
}

@media screen and (max-width: 992px) {
  .app-container {
    padding: 15px;
  }
  
  .el-form.filter-form {
    display: block;
    
    .el-form-item {
      width: 100%;
      margin-right: 0;
    }
  }
}

@media screen and (max-width: 768px) {
  .app-container {
    padding: 10px;
  }
  
  .page-title {
    font-size: 18px;
  }
}

/* 动画效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
  transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateY(20px);
  opacity: 0;
} 